cmake_minimum_required(VERSION 3.10.2)
project(videoCap)

#set(OpenCV_DIR /home/mod/code/opencv/opencv-3.4.15/build-r329/install/share/OpenCV)
#set(OpenCV_DIR /home/mod/code/opencv/opencv-4.5.3/build-r329/install/lib/cmake/opencv4)
find_package(OpenCV REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})

macro(add_example name)
   add_executable(${name} ${name}.cpp)
    target_link_libraries(${name} ${OpenCV_LIBS}) 
endmacro()

add_example(main)
